<!DOCTYPE html>
<html class="x-admin-sm">
{include file='public/header'}
<script src="/admin/xadmin/lib/layui/upload.js" charset="utf-8"></script>
<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="javascript:void(0)">首页</a>
            <a href="javascript:void(0)">回传</a>
            <a><cite>未支付用户手动回传</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" id="reload" title="刷新">
            <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
        </a>
    </div>
    <div class="x-body">
        <div class="layui-row">
            <form class="layui-form">
                <div class="layui-inline">
                    <label class="layui-form-label w-auto">用户ID：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="uid" placeholder="请输入用户id" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label w-auto">链接id：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="link_id" placeholder="请输入链接id" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label w-auto">计划ID：</label>
                    <div class="layui-input-inline" style='width:200px'>
                        <input type="text" name="advertiser_id" placeholder="请输入计划ID" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <button class="layui-btn" style="margin-left: 10px;" lay-submit lay-filter="searchList">搜索</button>
                <button type="reset" id="resetList" class="layui-btn layui-btn-primary">重置</button>
            </form>
        </div>
        <table id="unpaidUserManualReturnRecord" lay-filter="unpaidUserManualReturnRecord"></table>
    </div>
    
    <script>
        let params = {
            addUrl: '/cps/back/manualReturn'
        }
        form_ajax(params)
    </script>

    <script>
        let list = {
            elem: '#unpaidUserManualReturnRecord'
            , url: '/cps/back/manualReturnRecord' //数据接口
            , id: 'unpaidUserManualReturnRecord'
            , limit:15
            , page:true
            , cols: [[ //表头
                { field: 'id', title: 'ID',  align:'center', width: 100,}
                , { field: 'uid', title: '用户ID',  align:'center', width: 100,}
                , { field: 'return_amount', title: '回传金额',  align:'center',}
                , { title: '回传平台', align:'center', templet: function (d) {
                        return d.media_id == 1 ? '抖音' : d.media_id == 2 ? '快手' : d.media_id == 3 ? '百度' : ''
                    }
                }
                , { field: 'advertiser_id', title: '计划ID',  align:'center', }
                , { field: 'link_id', title: '链接ID',  align:'center',}
                , { title: '回传状态', align:'center', templet: function (d) {
                        return d.status == 1 ? '成功' : '失败'
                    }
                }
                , { title: '回传时间', align:'center', templet: function (d) {
                        return dayjsFormat(d.created_at)
                    }
                }
            ]]
        }
        tableList(list)
    </script>
</body>

</html>